package com.yc.springboot.demos.web;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Set;

//读入配置类
//@Component
@ConfigurationProperties(prefix = "demo")
@Data
public class DemoProperties {
    String name;
    int age;
    String[] likes;
    List<String> schools;
    List<Person> friends;
    Map<String,String> familys;
    List<Map<String,String>> dogs;
}

@Data
class Person {
    String name;
    int age;
    Set<String> likes;
}
